import { _decorator, Component, Node, v3, Vec2, Vec3 } from 'cc';
const { ccclass, property, executeInEditMode } = _decorator;

@ccclass('crossTest')
@executeInEditMode
export class crossTest extends Component {
    @property(Node)
    A: Node = null!;

    @property(Node)
    B: Node = null!;

    @property(Node)
    C: Node = null!;

    start() {}

    _V3 = v3();
    update(deltaTime: number) {
        Vec3.cross(this._V3, this.A.position, this.B.position);
        this.C.position = this._V3;
    }
}
